﻿using MediatR;
using Production.CommonLib.Models;
using Production.DomainLib.AggregatesModel.TechnologyAggregate;
using Swimj.CommonLib.Base;

namespace Production.ApplicationLib.Command
{
    public class CalculatingProductionPlanCommand : ProductionPlanEditRequestDto, IRequest<Result>
    {

    }

    public class CalculatingProductionPlanCommandHandler : IRequestHandler<CalculatingProductionPlanCommand,Result>
    {
        private readonly ITechnologyRepository _technologyRepository;

        public CalculatingProductionPlanCommandHandler(ITechnologyRepository technologyRepository)
        {
            _technologyRepository = technologyRepository;
        }

        public async Task<Result> Handle(CalculatingProductionPlanCommand request, CancellationToken cancellationToken)
        {
            // 根据工艺获取所有的工序
            var technologyDetails = await _technologyRepository.QueryTechnologyDetails(request.TechnologyId);


            throw new NotImplementedException();
        }
    }
}